package cn.flyboy.service;

import cn.flyboy.entity.Answer;
import cn.flyboy.entity.Teacher;
import cn.flyboy.entity.the_answer;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Set;

public interface TeacherService {

    // 登录
    public Teacher login(Teacher teacher);

    // 批量删除教师信息
    int deleteTeacherBatch(Set<String> ids);

    // 添加一位老师
    public void addTeacher(Teacher teacher);

    // 批量添加老师
    public int saveTeaExcel(MultipartFile file, HttpServletRequest req);

    // 查询一位老师
    public Teacher selTeacher(String userID);

    // 查询数量
    public int selTeaNumOfId(String userID);

    // 查询管理员的数量
    public int getManagerCount();

    //查询所有老师
    public List<Teacher> getAllTeacher();

    // 更新密码
    public int updPwd(Teacher teacher);

    // 删除老师
    public int delTeacher(String name);

    // 更新老师信息
    public int updTeacher(Teacher teacher);

    // 所发布考试学生提交的答案
    public List<Answer> selFileAnswerName(String examName, String teaName);

    public List<the_answer> selStuAnswer(String examName, String teaName);

    // 清除考试通时删除学生上传的答案
    public int delAnswer(String examName, String teaName);

    // 删除对应的学生信息
    public int delStudentOfExam(String exam);

    public int delStudentExam(String stuName, String stuExam);

    // 删除对应的考试记录
    public int delExam(String examName, String teaName);

}
